#ifndef __ARP_NET_H
#define __ARP_NET_H

#ifdef __cplusplus
extern "C" {
#endif
	
#include <net/netdev.h>

struct s_arp_statistics
{
	unsigned int sended;
	unsigned int sended_requests;
	unsigned int sended_replies;
	
	unsigned int received;
	unsigned int received_requests;
	unsigned int received_replies;
};

struct s_arphdr
{
	unsigned short ar_hrd;		/* format of hardware address*/
	unsigned short ar_pro;		/* format of protocol address*/
	unsigned char ar_hln;		/* length of hardware address*/
	unsigned char ar_pln;		/* length of protocol address*/
	unsigned short ar_op;		/* ARP opcode (command)	*/
};

struct s_arpcache
{
	unsigned int pa_addr;                 /* protocol address */
	unsigned char ha_addr[7];             /* hardware address */
	struct s_arpcache *next;
};

int arp_get_mac(unsigned int daddr, unsigned char *ha_addr);
void arp_debug(struct s_arphdr *arp);
//void arp_rcv(struct s_net_buff *buff, struct s_net_device *dev);
/***************************************************************************/
/* send an arp request
/***************************************************************************/
/* Input:  unsigned int daddr (IP address of destination (int))
/*         struct s_net_device *dev (Pointer to Device)
/***************************************************************************/
//void arp_request(unsigned int daddr, struct s_net_device *dev);

#ifdef __cplusplus
}
#endif

#endif